//
//  String+FileType.swift
//  yiplayer
//
//  Created by wkun on 2024/6/17.
//

import Foundation

extension String{
    func isVideo() -> Bool {
        let typs = ["mp4", "mov", "avi"]
        return typs.contains(self)
    }
    
    func isAudio() -> Bool {
        let typs = ["mp3", "wav", "ogg"]
        return typs.contains(self)
    }
    
    func isPhoto() -> Bool {
        let typs = ["webp", "jpg", "jpeg", "png"]
        return typs.contains(self)
    }
}
